#include "timer.h"
#include <QDebug>
#include <QTimerEvent>

Timer::Timer(QObject *parent) :
    QObject(parent)
{
    m_timer = startTimer(100);
    startTimer(1000);
}

void Timer::timerEvent(QTimerEvent *ev)
{
    static int p = 0;

    if(m_timer == ev->timerId())
        qDebug() << p++ << ", " << ev->timerId();
    else
        qDebug() << ".";
    if(p>=50)
        killTimer(m_timer);
}
